using System;
using System.Collections.Generic;

using ContinualFlame.Ajax;

namespace ContinualFlame.Locus
{	
	public class Session
	{	
		public const string SessionCookieName = "locus-client-id";
		
		public string Id { get; private set; }
		public string PlayerKey { get; private set; }
		public string GmKey { get; private set; }
		
		public Dictionary<string, ClientInfo> AuthorizedClients { get; private set; }
		public SynchronizationManager SyncManager { get; private set; }
		public GameController Controller { get; private set; }
		
		public Session(string id, string playerKey, string gmKey)
		{	
			Id = id;
			PlayerKey = playerKey;
			GmKey = gmKey;
			
			SyncManager = new SynchronizationManager();
			AuthorizedClients = new Dictionary<string, ClientInfo>();
			Controller = new GameController(this);
		}
	}
}
